package com.zy.dp.iterator.example1;

public class ConcreteAggregate extends Aggregate
{
	private String[] ss = null;

	public ConcreteAggregate(String[] ss)
	{

		this.ss = ss;
	}

	@Override
	public Iterator createIterator()
	{
		return new ConcreteIterator(this);
	}

	public Object get(int index)
	{

		Object obj = null;

		if (index < ss.length)
		{
			obj = ss[index];
		}
		return obj;
	}

	public int size()
	{

		return this.ss.length;
	}

}
